// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ZMySqlQuery.pas' rev: 5.00

#ifndef ZMySqlQueryHPP
#define ZMySqlQueryHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <ZSqlBuffer.hpp>	// Pascal unit
#include <ZSqlParser.hpp>	// Pascal unit
#include <ZSqlItems.hpp>	// Pascal unit
#include <ZSqlTypes.hpp>	// Pascal unit
#include <ZQuery.hpp>	// Pascal unit
#include <ZSqlExtra.hpp>	// Pascal unit
#include <ZLibMySql.hpp>	// Pascal unit
#include <ZToken.hpp>	// Pascal unit
#include <ZMySqlTr.hpp>	// Pascal unit
#include <ZMySqlCon.hpp>	// Pascal unit
#include <ZDirSql.hpp>	// Pascal unit
#include <DBCommon.hpp>	// Pascal unit
#include <ZDirMySql.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Zmysqlquery
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TZZMySqlOption { moStoreResult, moUseGen };
#pragma option pop

typedef Set<TZZMySqlOption, moStoreResult, moUseGen>  TZZMySqlOptions;

class DELPHICLASS TZZCustomMySqlDataset;
class PASCALIMPLEMENTATION TZZCustomMySqlDataset : public Zquery::TZZDataset 
{
	typedef Zquery::TZZDataset inherited;
	
private:
	bool FAlternativeView;
	TZZMySqlOptions FExtraOptions;
	Zdirmysql::TDirMySqlConnect* FUseConnect;
	Zdirmysql::TDirMySqlTransact* FUseTransact;
	HIDESBASE void __fastcall SetDatabase(Zmysqlcon::TZZMySqlDatabase* Value);
	HIDESBASE void __fastcall SetTransact(Zmysqltr::TZZMySqlTransact* Value);
	Zmysqlcon::TZZMySqlDatabase* __fastcall GetDatabase(void);
	Zmysqltr::TZZMySqlTransact* __fastcall GetTransact(void);
	int __fastcall GetAutoIncField(AnsiString Table);
	
protected:
	virtual void __fastcall QueryRecord(void);
	virtual void __fastcall ChangeAddBuffer(Zsqltypes::PRecordData AddRecord);
	virtual void __fastcall CreateConnections(void);
	virtual void __fastcall UpdateAfterPost(Zsqltypes::PRecordData OldData, Zsqltypes::PRecordData NewData
		);
	virtual void __fastcall InternalClose(void);
	
public:
	__fastcall virtual TZZCustomMySqlDataset(Classes::TComponent* AOwner);
	__fastcall virtual ~TZZCustomMySqlDataset(void);
	virtual void __fastcall AddTableFields(AnsiString Table, Zsqlitems::TSqlFields* SqlFields);
	virtual void __fastcall AddTableIndices(AnsiString Table, Zsqlitems::TSqlFields* SqlFields, Zsqlitems::TSqlIndices* 
		SqlIndices);
	
__published:
	__property Zmysqlcon::TZZMySqlDatabase* Database = {read=GetDatabase, write=SetDatabase};
	__property Zmysqltr::TZZMySqlTransact* Transaction = {read=GetTransact, write=SetTransact};
	__property TZZMySqlOptions ExtraOptions = {read=FExtraOptions, write=FExtraOptions, nodefault};
	__property bool AlternativeView = {read=FAlternativeView, write=FAlternativeView, default=0};
};


class DELPHICLASS TZZMySqlQuery;
class PASCALIMPLEMENTATION TZZMySqlQuery : public TZZCustomMySqlDataset 
{
	typedef TZZCustomMySqlDataset inherited;
	
public:
	__property MacroCount ;
	__property ParamCount ;
	
__published:
	__property MacroChar ;
	__property Macros ;
	__property MacroCheck ;
	__property Params ;
	__property ParamCheck ;
	__property DataSource ;
	__property Sql ;
	__property RequestLive ;
	__property Active ;
public:
	#pragma option push -w-inl
	/* TZZCustomMySqlDataset.Create */ inline __fastcall virtual TZZMySqlQuery(Classes::TComponent* AOwner
		) : TZZCustomMySqlDataset(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TZZCustomMySqlDataset.Destroy */ inline __fastcall virtual ~TZZMySqlQuery(void) { }
	#pragma option pop
	
};


class DELPHICLASS TZZMySqlTable;
class PASCALIMPLEMENTATION TZZMySqlTable : public TZZCustomMySqlDataset 
{
	typedef TZZCustomMySqlDataset inherited;
	
public:
	__fastcall virtual TZZMySqlTable(Classes::TComponent* AOwner);
	
__published:
	__property TableName ;
	__property ReadOnly ;
	__property DefaultIndex ;
	__property Active ;
public:
	#pragma option push -w-inl
	/* TZZCustomMySqlDataset.Destroy */ inline __fastcall virtual ~TZZMySqlTable(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word LIST_BLOCK_SIZE = 0x1f4;
static const Shortint MIN_FETCH_ROWS = 0x0;
static const Shortint MAX_NAME_LENGTH = 0x32;
static const Shortint MAX_LINKS_COUNT = 0x5;
static const Shortint MAX_SORT_COUNT = 0x5;
static const Byte MAX_FIELD_COUNT = 0xff;
static const Shortint MAX_INDEX_COUNT = 0x19;
static const Shortint MAX_INDEX_FIELDS = 0x19;
static const Shortint DEFAULT_STRING_SIZE = 0x32;
static const Word MAX_STRING_SIZE = 0x200;
static const char DEFAULT_MACRO_CHAR = '\x25';
#define ZEOS_PALETTE "Zeos Common"
#define ZEOS_DB_PALETTE "Zeos Access"
static const Word ZDBO_VERSION = 0xc47c;

}	/* namespace Zmysqlquery */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Zmysqlquery;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// ZMySqlQuery
